package com.genericity.demo04;

/**
 * 泛型接口的实现类，是一个泛型类，那么实现接口的泛型类泛型标识包含泛型接口的泛型标识
 * 简单来说：接口的实现类需要包含泛型接口的泛型标识
 * @param <E> 泛型实现类的扩充
 * @param <T>
 */
public class Pair<T,E> implements Generator<T>{

    private T key;
    // 实现类的扩充
    private E num;

    public Pair(T key, E num) {
        this.key = key;
        this.num = num;
    }

    @Override
    public T getKey() {
        return this.key;
    }

    public void setKey(T key) {
        this.key = key;
    }

    public E getNum() {
        return num;
    }

    public void setNum(E num) {
        this.num = num;
    }
}
